Skip to content

Fix ontology Makefile duplicate format entry, phony target declaration, and help-text wording#486

Merged
turbomam merged 2 commits into
mainfrom
copilot/remove-duplicate-owl-entry
Jun 3, 2026
Merged

Fix ontology Makefile duplicate format entry, phony target declaration, and help-text wording#486
turbomam merged 2 commits into
mainfrom
copilot/remove-duplicate-owl-entry

Conversation

Copilot AI commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

This PR applies four targeted cleanups in src/ontology/Makefile to remove ambiguity and correct target/help metadata. It eliminates a redundant format entry, fixes a phony declaration mismatch, and corrects two user-facing wording issues.

  • Build format list cleanup

    • Removed the duplicate owl token from FORMATS to keep the declared format set explicit and non-redundant.
  • Phony target correctness

    • Updated the .PHONY declaration adjacent to test_fast to reference test_fast (instead of repeating test), so target intent matches declaration.
  • User-facing text corrections

    • Corrected typo in mirror-disabled message (mirrorringmirroring).
    • Fixed normalize_src help text grammar and contraction (after editing ... it's serialised correctly).

Example diff excerpt:

-FORMATS = $(sort  owl obo json owl)
+FORMATS = $(sort  owl obo json)

-.PHONY: test
+.PHONY: test_fast
 test_fast:
 	$(MAKE_FAST) test
Original prompt
Please apply the following diffs and create a pull request.
Once the PR is ready, give it a title based on the messages of the fixes being applied.

[{"message":"`owl` appears twice in the `FORMATS` list. While `$(sort ...)` will deduplicate it, the duplicate entry is unnecessary and could cause confusion. Remove the second `owl`.","fixFiles":[{"filePath":"src/ontology/Makefile","diff":"diff --git a/src/ontology/Makefile b/src/ontology/Makefile\n--- a/src/ontology/Makefile\n+++ b/src/ontology/Makefile\n@@ -57,7 +57,7 @@\n ONTOLOGYTERMS =             $(TMPDIR)/ontologyterms.txt\n EDIT_PREPROCESSED =         $(TMPDIR)/$(ONT)-preprocess.owl\n \n-FORMATS = $(sort  owl obo json owl)\n+FORMATS = $(sort  owl obo json)\n FORMATS_INCL_TSV = $(sort $(FORMATS) tsv)\n RELEASE_ARTEFACTS = $(sort $(ONT)-base $(ONT)-full )\n \n"}]},{"message":"The `.PHONY` declaration on line 85 declares `test` as phony again (it was already declared on line 81), but the target immediately following it is `test_fast`. The `.PHONY` declaration should reference `test_fast`, not `test`, to correctly mark `test_fast` as a phony target.","fixFiles":[{"filePath":"src/ontology/Makefile","diff":"diff --git a/src/ontology/Makefile b/src/ontology/Makefile\n--- a/src/ontology/Makefile\n+++ b/src/ontology/Makefile\n@@ -82,7 +82,7 @@\n test: odkversion reason_test sparql_test robot_reports $(REPORTDIR)/validate_profile_owl2dl_$(ONT).owl.txt\n \techo \"Finished running all tests successfully.\"\n \n-.PHONY: test\n+.PHONY: test_fast\n test_fast:\n \t$(MAKE_FAST) test\n \n"}]},{"message":"Corrected spelling of 'mirrorring' to 'mirroring'.","fixFiles":[{"filePath":"src/ontology/Makefile","diff":"diff --git a/src/ontology/Makefile b/src/ontology/Makefile\n--- a/src/ontology/Makefile\n+++ b/src/ontology/Makefile\n@@ -449,7 +449,7 @@\n \n else # MIR=false\n $(MIRRORDIR)/%.owl:\n-\t@echo \"Not refreshing $@ because the mirrorring pipeline is disabled (MIR=$(MIR)).\"\n+\t@echo \"Not refreshing $@ because the mirroring pipeline is disabled (MIR=$(MIR)).\"\n endif\n \n \n"}]},{"message":"The phrase \"after you to make sure\" appears to be missing a word or is grammatically incorrect. It should likely read \"after editing to make sure\" or similar.","fixFiles":[{"filePath":"src/ontology/Makefile","diff":"diff --git a/src/ontology/Makefile b/src/ontology/Makefile\n--- a/src/ontology/Makefile\n+++ b/src/ontology/Makefile\n@@ -650,7 +650,7 @@\n \n Editor utilities:\n * validate_idranges:\tMake sure your ID ranges file is formatted correctly\n-* normalize_src:\tLoad and save your metpo-edit file after you to make sure its serialised correctly\n+* normalize_src:\tLoad and save your metpo-edit file after editing to make sure it's serialised correctly\n * explain_unsat:\tIf you have unsatisfiable classes, this command will create a markdown file (tmp/explain_unsat.md) which will explain all your unsatisfiable classes\n * validate-all-tsv:\tCheck all your tsv files for possible problems in syntax. Use ALL_TSV_FILES variable to list files\n * validate-tsv:\t\tCheck a tsv file for syntactic problems with tsvalid. Use TSV variable to pass filepath, e.g. make TSV=../my.tsv validate-tsv.\n"}]}]

Copilot AI changed the title [WIP] Remove duplicate owl entry from FORMATS list Fix ontology Makefile duplicate format entry, phony target declaration, and help-text wording Jun 2, 2026
Copilot AI requested a review from turbomam June 2, 2026 23:51
@turbomam turbomam marked this pull request as ready for review June 3, 2026 00:14
Copilot AI review requested due to automatic review settings June 3, 2026 00:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request performs small, targeted cleanups to the ODK-generated src/ontology/Makefile to reduce ambiguity in declared build formats, ensure phony target metadata matches the actual target, and correct user-facing help/echo text.

Changes:

  • Removed a redundant owl token from the FORMATS list (while $(sort ...) deduplicates, the explicit list is now non-redundant).
  • Corrected the .PHONY declaration to mark test_fast (not test) as phony in the section where test_fast is defined.
  • Fixed typos/grammar in user-facing messages and help text (mirrorringmirroring, and improved normalize_src help wording).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@turbomam turbomam merged commit 7a6707d into main Jun 3, 2026
9 checks passed
@turbomam turbomam deleted the copilot/remove-duplicate-owl-entry branch June 3, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants